package com.leoman.dao;

import com.leoman.entity.AdminUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * 总后台管理员
 * Created by Administrator on 2016/10/20 0018 下午 3:01.
 */
public interface AdminUserDao extends JpaRepository<AdminUser, Integer>, JpaSpecificationExecutor<AdminUser> {

    @Query("select a from AdminUser a where a.account = ?1")
    AdminUser findOneByAccount(String account);

    @Query("select a from AdminUser a where a.mobile = ?1")
    AdminUser findOneByMobile(String mobile);
}